<!-- 继承公共视图文件 -->
<extend name="./Application/Admin/View/layout.html" />
 <!-- 可变内容区域 -->
 <block name="mid">

	<div class="layui-row">
	    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px; margin-bottom: 0; float: left;" >
			<h2><i class="fa fa-indent red"></i><strong>&nbsp;&nbsp;权限列表</strong></h2>
		</fieldset>

	    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px; margin-bottom: 0; float: right;" >
	        <a href="{:U('Admin/rule/add')}" class="layui-btn layui-btn-primary" style="padding-right:12px;"><i class="fa fa-plus"></i>&nbsp;添加权限</a>
		</fieldset>
	    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px; margin-bottom: 0; float: right;" >
	        <a href="{:U('Admin/rule/to_out')}" class="layui-btn layui-btn-primary" style="padding-right:12px;"><i class="fa fa-plus"></i>&nbsp;excel导出</a>
		</fieldset>
	</div>
	<hr class="layui-bg-black">
	<div class="layui-row"	>
	    <div class="layui-col-sm12">
	        <table class="layui-table">
	            <thead>
	                <tr>
		                <th width="50">ID</th>
						<th>名称</th>
						<th>规则</th>
						<th>类型</th>
						<th>状态</th>
						<th>前/后台</th>
						<th>所属父级层级</th>
						<th>操作</th>
		            </tr>
		        </thead>
	            <tbody>
	              <foreach name="list" key="k" item="v" >
	                <tr>
	                    <td>{$v.id}</td>
						<td>{$v.title}</td>
						<td>{$v.name}</td>
						<td>{$v.type}</td>
						<td>{$v['status']==1?'启用':'禁用'}</td>
						<td>{$v['is_home']==1?'前台':'后台'}</td>
                        <td>{$v.pid}</td>
						<td>
							<a class="btn btn-success" href="table.html#">
								<i class="fa fa-search-plus "></i>
							</a>
							<a class="btn btn-info" href="table.html#">
								<i class="fa fa-edit "></i>
							</a>
							<a class="btn btn-danger" href="table.html#">
								<i class="fa fa-trash-o "></i>

							</a>
						</td>
	                </tr>
	              </foreach>
	            </tbody>
	        </table>
	        {$page}
	    </div>
	</div>



</block>